#!/bin/sh

set -eu

logging() {
  echo "imshow-hook: $*" >&2
}

case "$IMSHOW_HOOK_FUNC" in
0)
  logging "delete $IMSHOW_HOOK_IMAGE"
  trash-put "$IMSHOW_HOOK_IMAGE"
  echo "imshow: delete"
  ;;
*)
  logging "invalid hook func: $IMSHOW_HOOK_FUNC"
  ;;
esac
